/**
 * @作者 libin
 * @创建时间 2021-05-14 05:08
 */
package com.yhl.latticy.service;

import com.yhl.latticy.mapper.BannerMapper;
import com.yhl.latticy.model.BannerDO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TestSleeveService {

    @Autowired
    private BannerMapper bannerMapper;

    public List<BannerDO> getBanners() {
        return this.bannerMapper.getAllBanners();
    }

    public List<BannerDO> getBanners1() {
        return this.bannerMapper.getAllBanners1();
    }

    public long insertBanner() {
        BannerDO bannerDO = new BannerDO();
        bannerDO.setName("NewBanner");
        bannerDO.setTitle("NewBannerTitle");

        bannerMapper.insertBanner(bannerDO);
        return bannerDO.getId();
    }
}
